import request from '@/utils/request'

export function getList(data) {
  return request({
    url: '/api/club_swiper/',
    method: 'get',
    params: data
  })
}

export function createData(data) {
  return request({
    url: '/api/club_swiper/',
    method: 'post',
    headers: {
      'Content-Type': 'application/json'
    },
    data: data
  })
}

export function updateData(id, data) {
  return request({
    url: '/api/club_swiper/' + id + '/',
    method: 'patch',
    headers: {
      'Content-Type': 'application/json'
    },
    data: data
  })
}

export function deleteData(id) {
  return request({
    url: '/api/club_swiper/' + id + '/',
    method: 'delete'
  })
}

// 更新状态
export function updateStatus(id, data) {
  return request({
    url: '/api/club_swiper/' + id + '/change_status/',
    method: 'patch',
    headers: {
      'Content-Type': 'application/json'
    },
    data: data
  })
}
